package me.yuxiaoyao.lock.annotation;

import org.springframework.context.annotation.AdviceMode;
import org.springframework.context.annotation.Import;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author kerryzhang on 2020/12/21
 */

@Retention(RetentionPolicy.RUNTIME)
@Target(value = {ElementType.METHOD, ElementType.TYPE})
@Import(DistributedLockAutoConfiguration.class)
public @interface EnableDistributedLock {

    /**
     * advice mode default dynamic proxy
     *
     * @return
     */
    AdviceMode mode() default AdviceMode.PROXY;
}
